feat(plugins): add read-only lifecycle control plane - #44
Merged
Conversation
Add typed status, plan, verify, and doctor flows across supported host surfaces, with scope-safe observations, fail-closed plans, and isolated home bindings. Split Pi persistent and session-only behavior and document the portable host contracts. Implements docs/specs/2026-07-31-better-harness-plugin-lifecycle.md. Validation covers npm test (1163/1163), the documentation link graph (6/6), pack verification (401 npm entries and 424 runtime zip entries), and isolated public CLI smoke checks. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
…lane Bring the read-only plugin lifecycle branch up to date with main, which grew the Kimi Code and Grok adapters, the host capability registry under scripts/host-support/, the simplified issue templates, the Cursor Canvas default output, and the README "More adapters" consolidation. Conflict resolutions: - scripts/host-support/index.mjs keeps main's capability registry and adds the lifecycle profile facade beside it, so capability slices and lifecycle profiles stay separate concerns behind one host-support entry point. - The lifecycle profile suite moves to test/host-support-profiles.test.mjs so main's capability-registry suite keeps test/host-support.test.mjs. - Issue-template, Cursor Canvas, and README host-section changes follow main; the Cursor adapter row keeps the cursor-canvas output with the native cursor-agent help contract chain, and the Pi single-run guidance assertion now targets the Host Adapter Matrix instead of the trimmed README. - Lifecycle profiles stay at the eight hosts the spec validated. Kimi Code and Grok have no native lifecycle contract yet, so plugin and doctor targets reject them with UNKNOWN_HOST; the spec non-goals, adapter docs, and a target-resolution test record that boundary. Fixes surfaced by CI on the stale branch: - plugin plan tests stubbed host executables on PATH instead of depending on whichever host CLI happens to be installed, which is why "plugin plan emits typed argv" and the isolated/stale plan test failed on every CI runner. - Dropped the explicit node:process imports from the lifecycle and doctor CLIs; building that builtin's ESM facade touched process.stdin and broke the leaf-help zero-side-effect guard for doctor --help. - Refreshed the frozen commands/schema digests for the new plugin and doctor entries. Validation: npm test (1263/1263) and npm run pack:verify (447 npm entries, 469 runtime zip entries) on macOS. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
phodal
marked this pull request as ready for review
August 4, 2026 11:34
The Windows CI job failed on four assertions that assumed POSIX paths: - doctor host-home leak checks built a regular expression from a raw temp path, which is an invalid pattern once it contains backslashes; they now compare JSON-escaped path text instead. - the cross-capability import guard compared a platform-separated relative path against a slash-separated literal, so the registry metadata projection looked like a violation. - the plan binding test compared resolved plan targets against unresolved POSIX fixture strings, which gain a drive prefix on Windows. Validation: npm test (1263/1263) on macOS; the Windows job is the real gate. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugin status,plugin plan,plugin verify, anddoctorflows across eight supported hosts and eleven host surfacesdocs/specs/2026-07-31-better-harness-plugin-lifecycle.mdWhy
Lifecycle evidence and mutation planning previously depended on provider-specific assumptions that could borrow discovery, scope, or installation state across surfaces. This change introduces a shared read-only control plane so callers can inspect and plan against explicit evidence without executing host mutations.
Impact
Users and automation can query normalized status, verification, doctor, and deterministic plan envelopes. Unknown, mixed, foreign, or unbound host state fails closed.
plugin applyremains intentionally unregistered, so Better Harness does not execute lifecycle mutations.Validation
npm test— 1163/1163 passednode --test test/doc-link-graph.test.mjs— 6/6 passednpm run pack:verify— 401 npm entries and 424 runtime zip entriesgit diff origin/main...HEAD --checkRisk and follow-up
The native help fixture is contract evidence rather than live cross-platform acceptance. Real Codex Desktop, Pi same-session, and Windows host smoke remain follow-up validation boundaries.